home *** CD-ROM | disk | FTP | other *** search
/ Software USA 4 #12 / Software USA Volume 4.12.iso / mac / Educational / Gameshow / SUPFILES / alertWin.dcr / 00001.ls next >
Encoding:
Text File  |  1997-09-03  |  2.6 KB  |  101 lines

  1. on button buttonPressed, keepOn
  2.   global frameLeft
  3.   puppetSound(0)
  4.   set spriteNum to the clickOn
  5.   set castnumber to the castNum of sprite spriteNum
  6.   puppetSprite(spriteNum, 1)
  7.   repeat while the stillDown
  8.     if rollOver(spriteNum) then
  9.       set the castNum of sprite spriteNum to the number of member value(castnumber + 1)
  10.     else
  11.       set the castNum of sprite spriteNum to the number of member castnumber
  12.     end if
  13.     updateStage()
  14.   end repeat
  15.   set the castNum of sprite spriteNum to the number of member castnumber
  16.   updateStage()
  17.   if not keepOn then
  18.     puppetSprite(spriteNum, 0)
  19.   end if
  20.   if rollOver(spriteNum) then
  21.     do(string(buttonPressed))
  22.   end if
  23. end
  24.  
  25. on startMovie
  26.   global setuplist, QuesfileName
  27.   set action to getaProp(setuplist, #action)
  28.   case action of
  29.     "new":
  30.       put string("Creating a new file will close the file you are working on. Do you want to save changes to" && QUOTE & ALERTStripText() & QUOTE && "before starting another?") into field 11
  31.       go("base")
  32.     "convert":
  33.       put string("Updating a file from Gameshow Pro I will close the file you are working on." & RETURN & RETURN & "Do you want to save changes to" && QUOTE & ALERTStripText() & QUOTE && "before starting another?") into field 11
  34.       go("base")
  35.     "open":
  36.       put string("Opening another file will close the file you are working on. Do you want to save changes to" && QUOTE & ALERTStripText() & QUOTE && "before opening another?") into field 11
  37.       go("base")
  38.     "quit":
  39.       put string("Do you want to save changes to" && QUOTE & ALERTStripText() & QUOTE && "before quitting?") into field 11
  40.       go("base")
  41.     "revert":
  42.       put string("Reverting will discard any changes since this file was last saved") into field 11
  43.       go("revert")
  44.     "gotoSet":
  45.       go("gotoset")
  46.     "gotoQues":
  47.       go("gotoques")
  48.   end case
  49.   puppetSound(0)
  50. end
  51.  
  52. on DontSave
  53.   tell the stage
  54.     AlertDontSave()
  55.   end tell
  56. end
  57.  
  58. on Cancel
  59.   tell the stage
  60.     AlertCancel()
  61.   end tell
  62. end
  63.  
  64. on save
  65.   tell the stage
  66.     AlertSave()
  67.   end tell
  68. end
  69.  
  70. on revert
  71.   tell the stage
  72.     AlertRevert()
  73.   end tell
  74. end
  75.  
  76. on Exittosetup
  77.   tell the stage
  78.     GotoGame(1)
  79.   end tell
  80. end
  81.  
  82. on exittoques
  83.   tell the stage
  84.     GotoM1(1)
  85.   end tell
  86. end
  87.  
  88. on ALERTStripText
  89.   global QuesfileName, BasePath
  90.   set holder to the itemDelimiter
  91.   set the itemDelimiter to the last char in BasePath
  92.   set lastitem to the last item in QuesfileName
  93.   set the itemDelimiter to holder
  94.   if (the platform contains "Macintosh") or (QuesfileName = "Untitled") then
  95.     return lastitem
  96.     exit
  97.   end if
  98.   set strippedText to char 1 to the number of chars in QuesfileName - 4 of QuesfileName
  99.   return strippedText
  100. end
  101.